How to use QPainter in Python